import sys

def cal():
    line = sys.stdin.readline()
    length = len(line)
    max = 0
    if length == 0:
        print(max)
    else:
        for i in range(length):
            index = 0
            temp = 0
            for j in range(i, length):
                if line[j] == 'o':
                    index += 1
                if index % 2 == 0:
                    temp = j - i + 1
            if temp > max:
                max = temp
        print(max)

if __name__ == '__main__':
    cal()

